<?php 

class NoIndividuFinder{
	private $no_individu;
	private $db;
	
	public function NoIndividuFinder($db, $no_individu){
		$this->no_individu = $no_individu;
		$this->db 		   = $db;
	}
	
	public function response(){
		$q = "SELECT COUNT(*) FROM `caramel_managerial`.`pancang` WHERE `no_individu`='".$this->no_individu."'";
		$match = $this->db->get_var($q);
		
		if( $match )
			echo 'true';
		else
			echo 'false';
	}
}


// load database class handler
include_once '../config/db_config.php';
include '../library/ezsql/shared/ez_sql_core.php';
include '../library/ezsql/mysql/ez_sql_mysql.php';

// database handler
$db = new ezSQL_mysql($dbUser, $dbPass, $dbName, $dbHost);

$find = new NoIndividuFinder($db, $_GET['no_individu']);
$find->response();
?>